# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[events_watch(self.handle)
self.logger = EventLogger()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb776558c>}
nname: 0
n 0(None)[self.logger.add(event)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb77655cc>}
nname: 6
n 6(None)[__doc__ = "\n    Eventlogger plugin is used to log events in one file\n    it must be activated in local_conf.py or it won't be loaded.\n    "
def __init__(self):
	events_watch(self.handle)
	self.logger = EventLogger()

def handle(self, event):
	self.logger.add(event)

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb775ef0c>}
nname: 0
n 0(None)[events_watch(self.handle)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb776532c>}
nname: 109
n 109(None)[]:
	i: 80(), 108()
	o: 

nname: 108
n 108(None)[]:
	i: 0(f)
	o: 109()

nname: 80
n 80(None)[log.debug('DEBUG=%s, only calls=%s', debug.DEBUG_MODE, debug.CALLS_ONLY)
]:
	i: 25(), 57(), 70()
	o: 109()

nname: 70
n 70(None)[debug.DEBUG_MODE = False
]:
	i: 47(f)
	o: 80()

nname: 57
n 57(None)[debug.CALLS_ONLY = False
]:
	i: 47(t)
	o: 80()

nname: 47
n 47(debug.CALLS_ONLY)[]:
	i: 15(t)
	o: 57(t), 70(f)

nname: 25
n 25(None)[debug.DEBUG_MODE = True
debug.CALLS_ONLY = True
]:
	i: 15(f)
	o: 80()

nname: 15
n 15(debug.DEBUG_MODE)[]:
	i: 0(t)
	o: 25(f), 47(t)

nname: 0
n 0(event.name == 'DEBUG')[]:
	i: 
	o: 15(t), 108(f)

nname: 109
n 109(None)[]:
	i: 15(), 0(f)
	o: 

nname: 15
n 15(None)[if not debug.DEBUG_MODE:
	debug.DEBUG_MODE = True
	debug.CALLS_ONLY = True
else:
	if debug.CALLS_ONLY:
		debug.CALLS_ONLY = False
	else:
		debug.DEBUG_MODE = False
log.debug('DEBUG=%s, only calls=%s', debug.DEBUG_MODE, debug.CALLS_ONLY)
]:
	i: 0(t)
	o: 109()

nname: 0
n 0(event.name == 'DEBUG')[]:
	i: 
	o: 15(t), 109(f)

nname: 0
n 0(None)[if event.name == 'DEBUG':
	if not debug.DEBUG_MODE:
		debug.DEBUG_MODE = True
		debug.CALLS_ONLY = True
	else:
		if debug.CALLS_ONLY:
			debug.CALLS_ONLY = False
		else:
			debug.DEBUG_MODE = False
	log.debug('DEBUG=%s, only calls=%s', debug.DEBUG_MODE, debug.CALLS_ONLY)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7765a6c>}
nname: 6
n 6(None)[__doc__ = 'Debug plugin is used for enabling DEBUG mode.\n    Active in debug versions only.\n\n    TODO Maybe think of a way to enable it from redist versions?\n    '
def __init__(self):
	events_watch(self.handle)

def handle(self, event):
	if event.name == 'DEBUG':
		if not debug.DEBUG_MODE:
			debug.DEBUG_MODE = True
			debug.CALLS_ONLY = True
		else:
			if debug.CALLS_ONLY:
				debug.CALLS_ONLY = False
			else:
				debug.DEBUG_MODE = False
		log.debug('DEBUG=%s, only calls=%s', debug.DEBUG_MODE, debug.CALLS_ONLY)

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb775ef4c>}
nname: 0
n 0(None)[from __future__ import absolute_import
from peewee import debug
from peewee.notifier import events_watch
from pygui.input.eventlogger import EventLogger
log = debug.GET_LOGGER(__name__)
class EventLoggerPlugin(object):
	__doc__ = "\n    Eventlogger plugin is used to log events in one file\n    it must be activated in local_conf.py or it won't be loaded.\n    "
	def __init__(self):
		events_watch(self.handle)
		self.logger = EventLogger()

	def handle(self, event):
		self.logger.add(event)



class DebugPlugin(object):
	__doc__ = 'Debug plugin is used for enabling DEBUG mode.\n    Active in debug versions only.\n\n    TODO Maybe think of a way to enable it from redist versions?\n    '
	def __init__(self):
		events_watch(self.handle)

	def handle(self, event):
		if event.name == 'DEBUG':
			if not debug.DEBUG_MODE:
				debug.DEBUG_MODE = True
				debug.CALLS_ONLY = True
			else:
				if debug.CALLS_ONLY:
					debug.CALLS_ONLY = False
				else:
					debug.DEBUG_MODE = False
			log.debug('DEBUG=%s, only calls=%s', debug.DEBUG_MODE, debug.CALLS_ONLY)



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb775e92c>}
from __future__ import absolute_import
from peewee import debug
from peewee.notifier import events_watch
from pygui.input.eventlogger import EventLogger
log = debug.GET_LOGGER(__name__)
class EventLoggerPlugin(object):
	__doc__ = "\n    Eventlogger plugin is used to log events in one file\n    it must be activated in local_conf.py or it won't be loaded.\n    "
	def __init__(self):
		events_watch(self.handle)
		self.logger = EventLogger()

	def handle(self, event):
		self.logger.add(event)



class DebugPlugin(object):
	__doc__ = 'Debug plugin is used for enabling DEBUG mode.\n    Active in debug versions only.\n\n    TODO Maybe think of a way to enable it from redist versions?\n    '
	def __init__(self):
		events_watch(self.handle)

	def handle(self, event):
		if event.name == 'DEBUG':
			if not debug.DEBUG_MODE:
				debug.DEBUG_MODE = True
				debug.CALLS_ONLY = True
			else:
				if debug.CALLS_ONLY:
					debug.CALLS_ONLY = False
				else:
					debug.DEBUG_MODE = False
			log.debug('DEBUG=%s, only calls=%s', debug.DEBUG_MODE, debug.CALLS_ONLY)



